<?php

use Phalcon\Mvc\Application;

//error_reporting(0);

define('APP_PATH', realpath('..'));
try {

    /**
     * Read the configuration
     */
    $config = include APP_PATH . "/config/config.php";

    /**
     * Include routes
     */
    require __DIR__ . '/../config/routes.php';
    /**
     * Include servicesprint
     */
    require __DIR__ . '/../config/services.php';
    require __DIR__ . '/../config/loader.php';
    /**
     * Handle the request
     */
    $application = new Application($di);
    /**
     * Include modules
     */
    require __DIR__ . '/../config/modules.php';
    defined('PUBLICDIR') || define('PUBLICDIR',$di->get('url')->getBaseUri());
    defined('TIMESTAMP') || define('TIMESTAMP',time());
    echo $application->handle()->getContent();

} catch (Exception $e) {
    echo $e->getMessage();
}

